class Test(object):
    def __init__(self):
        print("__init__")

    # object类默认的类方法，为对象分配内存并返回引用，重写后
    def __new__(cls, *args, **kwargs):
        print("__new__")
        return super().__new__(cls)


if __name__ == "__main__":
    test = Test()
    print(test)